<?php
class ClsLDBManage
{
    private $dbhost="localhost";
    private $dbuser="";
    private $dbpass="";
    private $dbname="";
    public function __construct() 
    {
        $defaultDatabase=  getDefaultDatabase();
        $this->dbhost=ClsConfig::$DATABASE[$defaultDatabase]["host"];
        $this->dbuser=ClsConfig::$DATABASE[$defaultDatabase]["user"];
        $this->dbpass=ClsConfig::$DATABASE[$defaultDatabase]["password"];
        $this->dbname=$defaultDatabase;
    }
    public function verify()
    {
        include(getcwd()."/naanalsql.php");
        $arrDB=ClsLDB::getInstance("__GET__ALL__DB__");
        if($arrDB)
        foreach($arrDB as $database=>$objDB)
        {
            $arrTable=$objDB->getTable();
            if($arrTable)
            foreach($arrTable as $table=>$arrField)
            {
                foreach($arrField as $field=>$data)
                {
                    if(!isFieldExist($database, $table, $field))
                    {trace("($database), ($table), ($field)");
                        return false;
                    }
                }
            }
        }
        return true;
    }
    public static function &getInstance()
    {
        static $objDBManage=null;
        if(is_null($objDBManage))
        {
            $objDBManage=new ClsLDBManage();
        }
        return $objDBManage;
    }
}
?>